<!DOCTYPE html>

<html lang="en" data-content_root="../">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

  <title>GENERATED &mdash; CMake 4.1.1 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a2c47e09" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css?v=4d06bd55" />
    
    <script src="../_static/documentation_options.js?v=e6a937a4"></script>
    <script src="../_static/doctools.js?v=9bcbadda"></script>
    <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
    
    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="HEADER_FILE_ONLY" href="HEADER_FILE_ONLY.html" />
    <link rel="prev" title="Fortran_PREPROCESS" href="Fortran_PREPROCESS.html" />
 

  </head><body>
    <input id="sidebar-check" type="checkbox" />
    <label id="sidebar-overlay" for="sidebar-check"></label>



    <div class="related relbar1" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="HEADER_FILE_ONLY.html" title="HEADER_FILE_ONLY"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="Fortran_PREPROCESS.html" title="Fortran_PREPROCESS"
             accesskey="P">previous</a> |</li>
  <li>
    <label class="sidebar-toggle" for="sidebar-check"></label>
  </li>
  <li class="rootlink">
    <img src="../_static/cmake-logo-16.png" width="16" height="16" alt=""/>
    <a href="https://cmake.org/">CMake 4.1.1</a>
    <span class="reldelim1"> &#187;</span>
  </li>
  <li>
    <a href="../index.html">Documentation</a> &#187;
  </li>

          <li class="nav-item nav-item-1"><a href="../manual/cmake-properties.7.html" accesskey="U">cmake-properties(7)</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">GENERATED</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="generated">
<span id="prop_sf:GENERATED"></span><h1>GENERATED<a class="headerlink" href="#generated" title="Link to this heading">¶</a></h1>
<p>Is this source file generated as part of the build or CMake process.</p>
<div class="versionchanged">
<p><span class="versionmodified changed">Changed in version 3.20: </span>Turning on the <code class="docutils literal notranslate"><span class="pre">GENERATED</span></code> source file property in one directory allows
the associated source file to be used across directories without the need
to manually setting that property for other directory scopes, too.
Additionally, it may now be set only to boolean values, and may not be
turned off once turned on.  See policy <span class="target" id="index-0-policy:CMP0118"></span><a class="reference internal" href="../policy/CMP0118.html#policy:CMP0118" title="CMP0118"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0118</span></code></a>.</p>
</div>
<div class="versionchanged">
<p><span class="versionmodified changed">Changed in version 3.30: </span>Whether or not a source file is generated is an all-or-nothing global
property of the source.  Consequently, the <code class="docutils literal notranslate"><span class="pre">GENERATED</span></code> source file
property is now visible in all directories.  See policy <span class="target" id="index-0-policy:CMP0163"></span><a class="reference internal" href="../policy/CMP0163.html#policy:CMP0163" title="CMP0163"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0163</span></code></a>.</p>
</div>
<p>Tells the internal CMake engine that a source file is generated by an outside
process such as another build step, or the execution of CMake itself.
This information is then used to exempt the file from any existence or
validity checks.</p>
<p>Any file that is</p>
<ul class="simple">
<li><p>created by the execution of commands such as
<span class="target" id="index-0-command:add_custom_command"></span><a class="reference internal" href="../command/add_custom_command.html#command:add_custom_command" title="add_custom_command"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_command()</span></code></a> which run during the build</p></li>
<li><p>listed as one of the <code class="docutils literal notranslate"><span class="pre">BYPRODUCTS</span></code> of an <span class="target" id="index-1-command:add_custom_command"></span><a class="reference internal" href="../command/add_custom_command.html#command:add_custom_command" title="add_custom_command"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_command()</span></code></a>
or <span class="target" id="index-0-command:add_custom_target"></span><a class="reference internal" href="../command/add_custom_target.html#command:add_custom_target" title="add_custom_target"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_target()</span></code></a> command, or</p></li>
<li><p>created by a CMake <code class="docutils literal notranslate"><span class="pre">AUTOGEN</span></code> operation such as <span class="target" id="index-0-prop_tgt:AUTOMOC"></span><a class="reference internal" href="../prop_tgt/AUTOMOC.html#prop_tgt:AUTOMOC" title="AUTOMOC"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">AUTOMOC</span></code></a>,
<span class="target" id="index-0-prop_tgt:AUTORCC"></span><a class="reference internal" href="../prop_tgt/AUTORCC.html#prop_tgt:AUTORCC" title="AUTORCC"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">AUTORCC</span></code></a>, or <span class="target" id="index-0-prop_tgt:AUTOUIC"></span><a class="reference internal" href="../prop_tgt/AUTOUIC.html#prop_tgt:AUTOUIC" title="AUTOUIC"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">AUTOUIC</span></code></a></p></li>
</ul>
<p>will be marked with the <code class="docutils literal notranslate"><span class="pre">GENERATED</span></code> property.</p>
<p>When a generated file created as the <code class="docutils literal notranslate"><span class="pre">OUTPUT</span></code> of an
<span class="target" id="index-2-command:add_custom_command"></span><a class="reference internal" href="../command/add_custom_command.html#command:add_custom_command" title="add_custom_command"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_command()</span></code></a> command is explicitly listed as a source file
for any target in the same directory scope (which usually means the same
<code class="docutils literal notranslate"><span class="pre">CMakeLists.txt</span></code> file), CMake will automatically create a dependency to
make sure the file is generated before building that target.</p>
<p>The <a class="reference internal" href="../manual/cmake-generators.7.html#makefile-generators"><span class="std std-ref">Makefile Generators</span></a> will remove <code class="docutils literal notranslate"><span class="pre">GENERATED</span></code> files during
<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code>.</p>
<p>Generated sources may be hidden in some IDE tools, while in others they might
be shown. For the special case of sources generated by CMake's <span class="target" id="index-1-prop_tgt:AUTOMOC"></span><a class="reference internal" href="../prop_tgt/AUTOMOC.html#prop_tgt:AUTOMOC" title="AUTOMOC"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">AUTOMOC</span></code></a>,
<span class="target" id="index-1-prop_tgt:AUTORCC"></span><a class="reference internal" href="../prop_tgt/AUTORCC.html#prop_tgt:AUTORCC" title="AUTORCC"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">AUTORCC</span></code></a> or <span class="target" id="index-1-prop_tgt:AUTOUIC"></span><a class="reference internal" href="../prop_tgt/AUTOUIC.html#prop_tgt:AUTOUIC" title="AUTOUIC"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">AUTOUIC</span></code></a> functionality, the
<span class="target" id="index-0-prop_gbl:AUTOGEN_SOURCE_GROUP"></span><a class="reference internal" href="../prop_gbl/AUTOGEN_SOURCE_GROUP.html#prop_gbl:AUTOGEN_SOURCE_GROUP" title="AUTOGEN_SOURCE_GROUP"><code class="xref cmake cmake-prop_gbl docutils literal notranslate"><span class="pre">AUTOGEN_SOURCE_GROUP</span></code></a>, <span class="target" id="index-0-prop_gbl:AUTOMOC_SOURCE_GROUP"></span><a class="reference internal" href="../prop_gbl/AUTOMOC_SOURCE_GROUP.html#prop_gbl:AUTOMOC_SOURCE_GROUP" title="AUTOMOC_SOURCE_GROUP"><code class="xref cmake cmake-prop_gbl docutils literal notranslate"><span class="pre">AUTOMOC_SOURCE_GROUP</span></code></a>,
<span class="target" id="index-0-prop_gbl:AUTORCC_SOURCE_GROUP"></span><a class="reference internal" href="../prop_gbl/AUTORCC_SOURCE_GROUP.html#prop_gbl:AUTORCC_SOURCE_GROUP" title="AUTORCC_SOURCE_GROUP"><code class="xref cmake cmake-prop_gbl docutils literal notranslate"><span class="pre">AUTORCC_SOURCE_GROUP</span></code></a> and <span class="target" id="index-0-prop_gbl:AUTOUIC_SOURCE_GROUP"></span><a class="reference internal" href="../prop_gbl/AUTOUIC_SOURCE_GROUP.html#prop_gbl:AUTOUIC_SOURCE_GROUP" title="AUTOUIC_SOURCE_GROUP"><code class="xref cmake cmake-prop_gbl docutils literal notranslate"><span class="pre">AUTOUIC_SOURCE_GROUP</span></code></a> target
properties may influence where the generated sources are grouped in the project's
file lists.</p>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="Main">
        <div class="sphinxsidebarwrapper">
  <div>
    <h4>Previous topic</h4>
    <p class="topless"><a href="Fortran_PREPROCESS.html"
                          title="previous chapter">Fortran_PREPROCESS</a></p>
  </div>
  <div>
    <h4>Next topic</h4>
    <p class="topless"><a href="HEADER_FILE_ONLY.html"
                          title="next chapter">HEADER_FILE_ONLY</a></p>
  </div>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/prop_sf/GENERATED.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<search id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="HEADER_FILE_ONLY.html" title="HEADER_FILE_ONLY"
             >next</a> |</li>
        <li class="right" >
          <a href="Fortran_PREPROCESS.html" title="Fortran_PREPROCESS"
             >previous</a> |</li>
  <li>
    <label class="sidebar-toggle" for="sidebar-check"></label>
  </li>
  <li class="rootlink">
    <img src="../_static/cmake-logo-16.png" width="16" height="16" alt=""/>
    <a href="https://cmake.org/">CMake 4.1.1</a>
    <span class="reldelim1"> &#187;</span>
  </li>
  <li>
    <a href="../index.html">Documentation</a> &#187;
  </li>

          <li class="nav-item nav-item-1"><a href="../manual/cmake-properties.7.html" >cmake-properties(7)</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">GENERATED</a></li> 
      </ul>
    </div>

    <div class="footer" role="contentinfo">
    &#169; Copyright 2000-2025 Kitware, Inc. and Contributors.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.
    </div>
<script type="text/javascript">
(function() {
  "use strict";
  const hide = () => document.getElementById("sidebar-check").checked = false;
  addEventListener("keydown", e => (e.key === "Escape") && hide());
  addEventListener("click", e => (e.target.tagName === "A") && hide());
  addEventListener("hashchange", hide)
})();
</script>
  </body>
</html>